import unittest
from config.readconfig import Read
import requests
import p

# 实例化调用
ra=Read()
class MyTestCase(unittest.TestCase):
    # # V部落
    def test_something(self):
        vlogurl=ra.get_vlog("vurl")
        vtime=ra.get_vlog("timeout")
        print(vlogurl)
        print(vtime)
        vdata={"username":"sang","password":123}
        r=requests.post(vlogurl+"/login",data=vdata,timeout=int(vtime))
        print(r.json())
#         crm
#     def test_something1(self):
#         ccurl = ra.get_crm("curl")
#         vtime = ra.get_crm("timeout")
#         print(ccurl)
#         vdata = {"username": 18812345678, "password": 123456}
#         r = requests.post(ccurl + "/login", data=vdata, timeout=int(vtime))
#         print(r.json())


if __name__ == '__main__':
    unittest.main()
